function [confusionMatrix]  = cross_validation(test_data,results, labelToClassify)
class = unique(test_data(:,5)); 
binaryLabel = 0;
for i=1:size(class,1)
   
    if(class(i) == labelToClassify)
        binaryLabel = 1;
    else
        binaryLabel = 0;
    end
    
    c_ind = find(test_data(:,5)==class(i));

    n_correct  = size(find(results(c_ind',1)==binaryLabel),1);

    n_wrong = size(find(results(c_ind,1)~=binaryLabel),1);
    
    n_total = n_correct + n_wrong;
    
    p_correct = n_correct/n_total;
    p_wrong = n_wrong/n_total;
    if(binaryLabel ==1)
        confusionMatrix(i,:) = [class(i),p_correct,p_wrong] ;
    else
        confusionMatrix(i,:) = [class(i),p_wrong,p_correct] ;
    end
end